/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.saber.certificacao.modelos.relacionamentos.idcompostos;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author gbvbahia
 */
@Embeddable
public class IdVersaoQuestaoPk implements Serializable {

     @Column(name="versao_id")
    private Long versaorId;

    @Column(name="questao_id")
    private Long questaoId;

    public IdVersaoQuestaoPk() {
    }

    public IdVersaoQuestaoPk(Long versaorId, Long questaoId) {
        this.versaorId = versaorId;
        this.questaoId = questaoId;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final IdVersaoQuestaoPk other = (IdVersaoQuestaoPk) obj;
        if (this.versaorId != other.versaorId && (this.versaorId == null || !this.versaorId.equals(other.versaorId))) {
            return false;
        }
        if (this.questaoId != other.questaoId && (this.questaoId == null || !this.questaoId.equals(other.questaoId))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 79 * hash + (this.versaorId != null ? this.versaorId.hashCode() : 0);
        return hash;
    }

    public Long getQuestaoId() {
        return questaoId;
    }

    public void setQuestaoId(Long questaoId) {
        this.questaoId = questaoId;
    }

    public Long getVersaorId() {
        return versaorId;
    }

    public void setVersaorId(Long versaorId) {
        this.versaorId = versaorId;
    }
}
